package com.lineage.data.item_etcitem.add;

import com.lineage.data.executor.ItemExecutor;
import com.lineage.server.model.Instance.L1ItemInstance;
import com.lineage.server.model.Instance.L1PcInstance;
import com.lineage.server.serverpackets.S_SystemMessage;
import com.lineage.server.serverpackets.ServerBasePacket;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;

public class bossroomglass extends ItemExecutor {
  private static final Log _log = LogFactory.getLog(bossroomglass.class);
  
  public static ItemExecutor get() {
    return new bossroomglass();
  }
  
  public void execute(int[] data, L1PcInstance pc, L1ItemInstance item) {
    if (pc.getQuest().get_step(90558) != 1) {
      pc.sendPackets((ServerBasePacket)new S_SystemMessage("今日尚未进入武道馆无法使用此道具。"));
      return;
    } 
    if (pc.getQuest().get_step(90559) == 2) {
      pc.sendPackets((ServerBasePacket)new S_SystemMessage("每日此药水限定使用1灌。"));
      return;
    } 
    pc.getQuest().set_step(90559, 1);
    pc.sendPackets((ServerBasePacket)new S_SystemMessage("您可在进入武道馆闯关额外多一次。"));
    pc.getInventory().removeItem(item, 1L);
  }
}
